<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>渐变</title>
  <style>
    .linear {
      width: 200px;
      height: 200px;
      background-color: green;
      background-image: linear-gradient(to right, skyblue, greenyellow);
      background-image: linear-gradient(skyblue 70%,
          greenyellow);
    }

    .radial {
      width: 100px;
      height: 100px;
      background-color: pink;
      border-radius: 50%;
      background-image: radial-gradient(50px at center center,
          red,
          pink);
      background-image: radial-gradient(50px 20px at center center,
          red,
          pink);
      background-image: radial-gradient(50px at 50px 30px,
          red,
          pink);
    }

    button {
      width: 100px;
      height: 40px;
      background-color: green;
      border: 0;
      border-radius: 5px;
      color: #fff;
    }
  </style>
</head>

<body>
  <div class="linear"></div>
  <!-- 径向渐变类 -->
  <div class="radial"></div>
  <button>按钮</button>
</body>

</html>